﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Entity.Package
{
    /// <summary>
    /// 缴费成功返回包
    /// </summary>    
    public class PackReturnPaymentSuccess
    {
        //通用结构        
        private PackHead packHead;
        public PackHead PackHead
        {
            get { return packHead; }
            set { packHead = value; }
        }
        private string tradeCode="";   //交易码
        public string TradeCode
        {
            get { return tradeCode; }
            set { tradeCode = value; }
        }
        private string responseCode=""; //响应码
        public string ResponseCode
        {
            get { return responseCode; }
            set { responseCode = value; }
        }
        private string ownFeeMoney="";  //欠费金额
        public string OwnFeeMoney
        {
            get { return ownFeeMoney; }
            set { ownFeeMoney = value; }
        }
        private string gasUserID="";    //用户编号
        public string GasUserID
        {
            get { return gasUserID; }
            set { gasUserID = value; }
        }
        private string userName="";     //用户名称
        public string UserName
        {
            get { return userName; }
            set { userName = value; }
        }
        private string address="";      //用户地址
        public string Address
        {
            get { return address; }
            set { address = value; }
        }
        private string protocolType=""; //协议类型
        public string ProtocolType
        {
            get { return protocolType; }
            set { protocolType = value; }
        }
        private string lastYE="";       //上次结余
        public string LastYE
        {
            get { return lastYE; }
            set { lastYE = value; }
        }
        private string userProperties="";//用户性质
        public string UserProperties
        {
            get { return userProperties; }
            set { userProperties = value; }
        }
        private string accountBalance="";  //本次结余
        public string AccountBalance
        {
          get { return accountBalance; }
          set { accountBalance = value; }
        }
        private string rubbishFee="";    //垃圾费
        public string RubbishFee
        {
            get { return rubbishFee; }
            set { rubbishFee = value; }
        }
        private string repairFee="";     //维修费
        public string RepairFee
        {
            get { return repairFee; }
            set { repairFee = value; }
        }
        private string memo="";          //备注
        public string Memo
        {
            get { return memo; }
            set { memo = value; }
        }
        private string useGasCount="";   //用气量
        public string UseGasCount
        {
            get { return useGasCount; }
            set { useGasCount = value; }
        }
        private string gasFee="";        //气费
        public string GasFee
        {
            get { return gasFee; }
            set { gasFee = value; }
        }
        private string collectionFee=""; //代收费
        public string CollectionFee
        {
            get { return collectionFee; }
            set { collectionFee = value; }
        }
        private string extraFee1=""; //附加费1
        public string ExtraFee1
        {
            get { return extraFee1; }
            set { extraFee1 = value; }
        }
        private string penalty="";  //违约金
        public string Penalty
        {
            get { return penalty; }
            set { penalty = value; }
        }
        private string extraFee2=""; //附加费2
        public string ExtraFee2
        {
            get { return extraFee2; }
            set { extraFee2 = value; }
        }
        private string startMonth=""; //开始月份
        public string StartMonth
        {
            get { return startMonth; }
            set { startMonth = value; }
        }
        private string endMonth=""; //终止月份
        public string EndMonth
        {
            get { return endMonth; }
            set { endMonth = value; }
        }
        private string lastMeterNumber=""; //上次表读数
        public string LastMeterNumber
        {
            get { return lastMeterNumber; }
            set { lastMeterNumber = value; }
        }
        private string thisMeterNumber=""; //本次表读数
        public string ThisMeterNumber
        {
            get { return thisMeterNumber; }
            set { thisMeterNumber = value; }
        }
        private string lastChargeDate="";//上次抄表时间
        public string LastChargeDate
        {
            get { return lastChargeDate; }
            set { lastChargeDate = value; }
        }
        private string thisChargeDate="";//本次抄表时间
        public string ThisChargeDate
        {
            get { return thisChargeDate; }
            set { thisChargeDate = value; }
        }
        private string payMoney=""; //本次交费
        public string PayMoney
        {
            get { return payMoney; }
            set { payMoney = value; }
        }
        private string cbRecordTimes=""; //明细次数
        public string CbRecordTimes
        {
            get { return cbRecordTimes; }
            set { cbRecordTimes = value; }
        }
    

        /// <summary>
        /// 构造函数
        /// </summary>
        public PackReturnPaymentSuccess()
        { }

        public override string ToString()
        {
            string packBody = tradeCode + "|" + responseCode + "|" + ownFeeMoney + "|" + gasUserID + "|" +
                    userName + "|" + address + "|" + protocolType + "|" + lastYE + "|" + userProperties+"|" +accountBalance+"|" +
                    repairFee + "|" + rubbishFee + "|" + memo + "|" + useGasCount + "|" + gasFee + "|" + collectionFee + "|" +
                    extraFee1 + "|" + penalty + "|" + extraFee2 + "|" + startMonth + "|" + endMonth + "|" + lastMeterNumber + "|" +
                    thisMeterNumber + "|" + lastChargeDate + "|" + thisChargeDate + "|" + payMoney + "|" + cbRecordTimes ;
            if (packHead == null)
                return packBody;
            else
                return packHead.ToString() + packBody;
        }
    }
}
